/**
 * 
 */
package com.leyu.mall.dao.user;

import java.util.List;

import com.leyu.mall.domain.user.Permision;
import com.leyu.mall.domain.user.Role;
import com.leyu.mall.domain.user.UserGroup;
import com.leyu.mall.domain.user.UserRole;

/**
 * @author change
 * 
 */
public interface RBACMapper {

	public void insertRole(Role role);

	public void insertPermision(Permision permision);

	public void insertUserGroup(UserGroup group);

	public void insertUserRole(UserRole userRole);

	public int removeRole(Long roleId);

	public int removePermisions(Long roleId);

	public int removeUserGroup(Long id);

	public int removeRoleFromUser(Long userId);

	public List<Role> listUserRoles(Long userId);
	public List<Permision> listRolePermisions(Long roleId);
	public List<Permision> listRolePermisions(Long []roleIds);
	
	public List<Permision> listUserPermisions(Long userId);
	
}
